package com.csst.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Order entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "order", catalog = "pay")
public class Order implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Integer orderId;
	@Column(name = "BuyerId", length = 11)
	private Integer buyerId;
	@Column(name = "PayerId", length = 11)
	private Integer payerId;
	@Column(name = "SellerId", length = 11)
	private Integer sellerId;
	private String identNum;
	private Integer state;
	private Double money;
	@Column(name = "OTime", length = 30)
	private String otime;

	// Constructors

	/** default constructor */
	public Order() {
	}

	/** full constructor */

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "OrderId", unique = true, nullable = false)
	public Integer getOrderId() {
		return this.orderId;
	}

	public void setOrderId(Integer orderId) {
		this.orderId = orderId;
	}

	
	@Column(name = "IdentNum", length = 30)
	public String getIdentNum() {
		return this.identNum;
	}

	public void setIdentNum(String identNum) {
		this.identNum = identNum;
	}

	@Column(name = "State")
	public Integer getState() {
		return this.state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	@Column(name = "Money", precision = 22, scale = 0)
	public Double getMoney() {
		return this.money;
	}

	public void setMoney(Double money) {
		this.money = money;
	}

	public void setBuyerId(Integer buyerId) {
		this.buyerId = buyerId;
	}
	
	
	public Integer getBuyerId() {
		return buyerId;
	}

	public Integer getPayerId() {
		return payerId;
	}

	public void setPayerId(Integer payerId) {
		this.payerId = payerId;
	}

	public Integer getSellerId() {
		return sellerId;
	}

	public void setSellerId(Integer sellerId) {
		this.sellerId = sellerId;
	}

	public String getOtime() {
		return otime;
	}

	public void setOtime(String otime) {
		this.otime = otime;
	}

	public Order(Integer orderId, Integer buyerId, Integer payerId,
			Integer sellerId, String identNum, Integer state, Double money,
			String otime) {
		super();
		this.orderId = orderId;
		this.buyerId = buyerId;
		this.payerId = payerId;
		this.sellerId = sellerId;
		this.identNum = identNum;
		this.state = state;
		this.money = money;
		this.otime = otime;
	}

	@Override
	public String toString() {
		return "Order [buyerId=" + buyerId + ", identNum=" + identNum
				+ ", money=" + money + ", orderId=" + orderId + ", otime="
				+ otime + ", payerId=" + payerId + ", sellerId=" + sellerId
				+ ", state=" + state + "]";
	}
     

	

}